package com.study.samsung.Control.htControl;

import com.study.samsung.Entity.Commodity;
import com.study.samsung.Service.GoodsListPageService;
import com.study.samsung.Utils.BaseServlet;
import com.study.samsung.Utils.Pagers;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

//@WebServlet("/GoodsListPage")
//public class GoodsListPageServlet extends BaseServlet {
//    GoodsListPageService gps = new GoodsListPageService();
//    @Override
//    public String excute(HttpServletRequest request, HttpServletResponse response) throws Exception {
//        request.setCharacterEncoding("UTF-8");
//        String currentPage = request.getParameter("currentPage");
//        String pageSize = request.getParameter("pageSize");
//        if(currentPage == null || "".equals(currentPage)) {
//            currentPage="1";
//        }
//        if(pageSize == null || "".equals(pageSize)) {
//            pageSize="5";
//        }
//
//        Pagers<Commodity> page = gps.findPage(currentPage, pageSize);
//        System.out.println("查询到的商品内容："+page.getList());
//        session.setAttribute("page",page);
//        return "f:htjsp/goods-list";
//    }
//}
